Skip to main content

Introduction to vale

Vale is an open source linting tool designed to enhance clarity, consistency, and quality in written content. It's especially useful for technical documentation, blogs, and knowledge bases. By enforcing custom style guides, teams can maintain a unified voice across all content.


🌟 Vale's key features​

βœ… Custom Rules: define rules tailored to your organization’s writing standards.
βœ… Predefined Style Guides: use existing guides like Proselint, write-good, and alex, or create your own.
βœ… Consistency: ensure uniform terminology, brand voice, and inclusive language.

βœ… Real-time Linting: identify grammar, spelling, and style issues instantly.
βœ… Automated Error Detection: streamline content reviews for greater efficiency.
βœ… Minimized Manual Editing: enforce writing standards and reduce manual corrections.

βœ… CI/CD Integration: works seamlessly with GitHub Actions, GitLab CI/CD, and Git Hooks.
βœ… Efficiency: runs smoothly within CI/CD workflows.
βœ… Broad Compatibility: supports GitHub Actions, GitLab CI/CD, Travis CI, and other automation tools.

βœ… Multi-Format Support: compatible with Markdown .md, reStructuredText .rst, HTML .html, LaTeX .tex, and Markdown Extended .mdx.
βœ… Content Quality Assurance: enhances quality across various content types, including documentation and blogs.

βœ… Batch Processing: facilitates large-scale content reviews.

βœ… Editor & IDE Integration:


πŸ’‘ Practical use cases​

βœ… Technical documentation​

πŸ”Ή Standardizes terminology and formatting in API docs, guides, and manuals.
πŸ”Ή Identifies typos, ambiguities, and inconsistencies in technical content.

βœ… Content editing & review​

πŸ”Ή Automates content reviews to align with brand guidelines.
πŸ”Ή Improves clarity and readability by flagging common mistakes.

βœ… Documentation & Wiki quality assurance​

πŸ”Ή Enforces documentation standards for open-source projects and enterprise knowledge bases.
πŸ”Ή Reduces manual review efforts with automated quality checks.


πŸ”§ Installing vale​

Install Vale using a package manager:

# macOS (Homebrew)
brew install vale

# Windows (Winget)
winget install vale

# Python (via pip)
pip install vale

After installation, configure Vale by creating a .vale.ini file in your project’s root directory.

πŸ“– For more installation options, visit the official Vale documentation.


βš™οΈ Configuring vale​

Use the vale configuration generator to create .vale.ini files. Define rules, severity levels, and file formats.

πŸ“Œ Generate your configuration file using the Vale configuration generator.


πŸ› οΈ Selecting a base style​

Vale supports various writing style guides:

βœ” Microsoft writing style guide βœ” Google developer documentation style guide βœ” Red Hat documentation style guide

πŸ”Ή Use one base style to prevent conflicts.

Example: Applying the Microsoft Writing Style Guide

StylesPath = styles
MinAlertLevel = suggestion
Packages = Microsoft

[*.{md}]
BasedOnStyles = Vale, Microsoft

πŸ“Œ Effect: The Microsoft Writing Style Guide applies to all .md files.

πŸ’‘ Run vale sync after configuration to initialize Vale.


πŸ”— Enhancing content with supplementary styles​

Supplementary styles improve grammar, clarity, and inclusivity:

βœ” Proselint: Improves grammar and readability.
βœ” Write-good: Enforces clear, concise writing.
βœ” Alex: Detects non-inclusive language.
βœ” Joblint: Identifies biased language in job descriptions.

Combining styles for better content analysis​

StylesPath = styles
MinAlertLevel = suggestion
Packages = Microsoft, proselint, write-good, alex

[*.{md}]
BasedOnStyles = Vale, Microsoft, proselint, write-good, alex

πŸ“Œ Effect:
βœ… Microsoft β†’ Writing best practices
βœ… Proselint β†’ Grammar and readability improvements
βœ… Write-good β†’ Clear, concise writing
βœ… Alex β†’ Inclusive language enforcement


πŸ“ File-Specific configurations​

Configure Vale for specific file types.

Markdown .md and Markdown Extended .mdx

[*.{md,mdx}]
BasedOnStyles = Vale, Microsoft, proselint, write-good, alex

βœ” Effect: Applies writing rules to Markdown and MDX files.

Markdown .md and reStructuredText .rst

[*.{md,rst}]
BasedOnStyles = proselint

βœ” Effect: Proselint rules apply to Markdown and reStructuredText files (commonly used in Python documentation).


πŸ”„ Running vale​

Once .vale.ini is configured, initialize Vale:

vale sync

βœ” Downloads required style guides from StylesPath.

πŸ“Œ Discover more styles in the package explorer.


πŸ”§ Configuring the vale language server​

The vale language server improves your workflow by offering real-time grammar, style, and consistency checks via the Language Server Protocol (LSP).

πŸ”Ή Provides autocomplete, diagnostics, hover popups, and inline suggestions.
πŸ”Ή Compatible with various text editors and IDEs.

Setup steps​

1️⃣ Download vale-LS: GitHub Releases
2️⃣ Verify vale Installation: ensure it’s available in your system’s $PATH.
3️⃣ Configure vale: define linting rules in .vale.ini.
4️⃣ Launch vale-LS: start it in your editor.


With vale and its language server, you can automate content quality checks, maintain consistency, and improve writing efficiency. πŸš€